<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>我的账户 - 易安网</title>
		<%@ include file="/user_comm.jsp"%>
		<script>
			function initPage(){
			  var selcountry=document.getElementById("userInfo.country").value;   		
		   	  if(selcountry=="HK"||selcountry=="CN"||selcountry=="TW"){
		   	  	//中国或香港,显示手机、中文名等
		   	  	document.getElementById("tr_zhname").style.display="block";
		   	  	if(selcountry=="CN")
		   	  	  document.getElementById("tr_mobile").style.display="block";
		   	  	else
		   	  	  document.getElementById("tr_mobile").style.display="none";
		   	  }else{
		   	  	document.getElementById("tr_zhname").style.display="none";
		   	  	document.getElementById("tr_mobile").style.display="none";
		   	  }
			}
		</script>
	</head>
	<body onload="initPage();">
		<%@ include file="/user_top.jsp"%>
		<div class="realCer">
			<link rel="stylesheet"
				href="<%=request.getContextPath()%>/css/cfb_color.css"
				type="text/css" />
			<div class="realMain clearfix mt10 zffs wdzh">
				<%@ include file="/user_menu.jsp"%>
				<div class="realRight ml10 l_bar">
					<div class="mybox">
						<div class="mytit">
							<span class="fl">
								<s:if test="#request.currentUser.userId == #request.userInfo.userId">
									我的账户
								</s:if>
								<s:else>
									账户信息查看
								</s:else>
							</span>
						</div>
						<s:hidden id="hdfId" name="userInfo.id"
							value="%{#request.userInfo.id}" />
						<s:hidden id="hdfCountry" name="userInfo.country"
							value="%{#request.userInfo.country}" />
						<div class="con">
							<!--我的账户-->
							<div>
								<h2>
									<span class="l"></span>
									<s:if test="#request.currentUser.userId == #request.userInfo.userId">
										我的账户
									</s:if>
									<s:else>
										账户信息
									</s:else>
									<span class="r"></span>
								</h2>
								<table class="basicInfor">
									<tr>
										<td class="label">
											用户名：
										</td>
										<td>
											${userInfo.userId }
										</td>
									</tr>
									<tr id="tr_zhname">
										<td class="label">
											姓&nbsp;&nbsp;名：
										</td>
										<td>
											${userInfo.chineseName }
										</td>
									</tr>
									<!-- 
									<tr>
										<td class="label">
											英文名：
										</td>
										<td>
											${userInfo.firstName }&nbsp;${userInfo.lastName }
										</td>
									</tr>
									 -->
									<s:if test="#request.companyId != #request.userInfo.deptId ">
										<tr>
											<td class="label">
												所属部门：
											</td>
											<td>
												<s:property value="convertDeptId(#request.userInfo.deptId)" />
											</td>
										</tr>
									</s:if>

									<tr>
										<td class="label">
											账户级别：
										</td>
										<td>
											<s:if test="1==#request.userInfo.userRole ">
												系统管理员
											</s:if>
											<s:elseif test="2==#request.userInfo.userRole ">
												部门管理员
											</s:elseif>
											<s:elseif test="3==#request.userInfo.userRole ">
												操作员
											</s:elseif>
										</td>
									</tr>

									<s:if
										test="#request.currentUser.userId != #request.userInfo.userId">
										<tr>
											<td class="label">
												账户状态：
											</td>
											<td>
												<s:if test='"1"==#request.userInfo.status '>
												正常
											</s:if>
												<s:elseif test='"2"==#request.userInfo.status '>
												冻结
											</s:elseif>
												<s:elseif test='"3"==#request.userInfo.status '>
												已删除
											</s:elseif>
											</td>
										</tr>
									</s:if>
									<tr id="tr_mobile">
										<td class="label">
											手&nbsp;&nbsp;机：
										</td>
										<td>
											${userInfo.cellphone }
										</td>
									</tr>

									<tr>
										<td class="label">
											联系电话：
										</td>
										<td>
											${userInfo.telephone }
										</td>
									</tr>

									<tr>
										<td class="label">
											电子邮箱：
										</td>
										<td>
											${userInfo.email }
										</td>
									</tr>
									<tr>
										<td class="label">
											创建时间：
										</td>
										<td>
											<s:date name="#request.userInfo.registerDate"
												format="yyyy-MM-dd HH:mm" />
										</td>
									</tr>
									<s:if test="#request.currentUser.userId == #request.userInfo.userId">
										<tr>
											<td class="label">
												资料维护：
											</td>
											<td>
												<ul>
													<li>
														<a target="_self"
															href="<s:url action="userInfo_editPage"><s:param name="id"><s:property value="#request.userInfo.id"/></s:param></s:url>">
															修改个人资料</a>
													</li>
													<li>
														<a target="_self"
															href="<s:url action="userInfo_changePwd"></s:url>">
															修改登陆密码</a>
													</li>
												</ul>
											</td>
										</tr>
									</s:if>
									<s:else>
										<tr>
											<td>
											</td>
											<td>
												<a href="javascript:history.go(-1);" class="at_but b_1_y" id="reg_sub"><u></u>返回</a>
											</td>
										</tr>
									</s:else>
								</table>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
		<%@ include file="/user_button.jsp"%>
	</body>
</html>
